Building apps and products on the Ouro platform
Discover assets like this one.
I wanted to share a few API wrappers we've built to make existing APIs more compatible with Ouro. You can use these as inspiration for wrapping your own APIs.
https://github.com/ourofoundation/wrappers
What does more compatible mean?
While any API can be added to Ouro, a lot of the value in adding them here comes when the API is configured to be able to use existing assets on the platform as inputs and create new assets as outputs.
For accepting an asset as input or creating one as output, make sure your route is configured with the right asset type:
Alternatively, before uploading your OpenAPI spec, you can set decorators on your routes if you're using FastAPI:
@ouro_field("x-ouro-input-asset-type", "post")
@ouro_field("x-ouro-output-asset-type", "file")
@app.post("/transform/synthesize", summary="Synthesize a post into an audio file")
async def synthesize(body: SythesizeRequest):
audio_file = audio.synthesize(body.post.content["text"], body.config.voice)
return Response(content=audio_file, media_type="audio/mpeg")
See https://ouro.foundation/docs/elements/water#specifying-input-and-output-asset-types for more on this.