Classifies if text and/or image inputs are potentially harmful. Learn more in the [moderation guide](/docs/guides/moderation).
Body
application/json
Body
CreateModerationRequest
One OfInput (or inputs) to classify. Can be a single string, an array of strings, or
an array of multi-modal input objects similar to other models.
A string of text to classify for moderation.
Default:
Example:I want to kill them.
Any OfThe content moderation model you would like to use. Learn more in
the moderation guide, and learn about
available models here.
Default:omni-moderation-latest
Example:omni-moderation-2024-09-26
Response
200 application/json
Response
OK
CreateModerationResponse
Represents if a given text input is potentially harmful.
The unique identifier for the moderation request.
The model used to generate the moderation results.
A list of moderation objects.
Show Child Parameters
Authentication
Body
Audit Logs
List user actions and configuration changes within this organization.
List user actions and configuration changes within this organization.
Query Parameters
Return only events whose effective_at (Unix seconds) is in this range.
Show Child Parameters
Return only events for these projects.
The event type.
Allowed values:api_key.createdapi_key.updatedapi_key.deletedinvite.sentinvite.acceptedinvite.deletedlogin.succeededlogin.failedlogout.succeededlogout.failedorganization.updatedproject.createdproject.updatedproject.archivedservice_account.createdservice_account.updatedservice_account.deletedrate_limit.updatedrate_limit.deleteduser.addeduser.updateduser.deleted
Return only events performed by these actors. Can be a user ID, a service account ID, or an api key tracking ID.
Return only events performed by users with these emails.
Return only events performed on these targets. For example, a project ID updated.
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
Default:20
A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
Response
200 application/json
Response
Audit logs listed successfully.
ListAuditLogsResponse
Allowed values:list
A log of a user action or configuration change within this organization.
Show Child Parameters
Example:audit_log-defb456h8dks
Example:audit_log-hnbkd8s93s
Authentication
Query Parameters
Get costs details for the organization.
Query Parameters
Start time (Unix seconds) of the query time range, inclusive.
End time (Unix seconds) of the query time range, exclusive.
Width of each time bucket in response. Currently only 1d is supported, default to 1d.
Allowed values:1d
Default:1d
Return only costs for these projects.
Group the costs by the specified fields. Support fields include project_id, line_item and any combination of them.
Allowed values:project_idline_item
A limit on the number of buckets to be returned. Limit can range between 1 and 180, and the default is 7.
Default:7
A cursor for use in pagination. Corresponding to the next_page field from the previous response.
Response
200 application/json
Response
Costs data retrieved successfully.
UsageResponse
Allowed values:page
Show Child Parameters
Authentication
Query Parameters
Get audio speeches usage details for the organization.
Query Parameters
Start time (Unix seconds) of the query time range, inclusive.
End time (Unix seconds) of the query time range, exclusive.
Width of each time bucket in response. Currently 1m, 1h and 1d are supported, default to 1d.
Allowed values:1m1h1d
Default:1d
Return only usage for these projects.
Return only usage for these users.
Return only usage for these API keys.
Return only usage for these models.
Group the usage data by the specified fields. Support fields include project_id, user_id, api_key_id, model or any combination of them.
Allowed values:project_iduser_idapi_key_idmodel
Specifies the number of buckets to return.
bucket_width=1d: default: 7, max: 31bucket_width=1h: default: 24, max: 168bucket_width=1m: default: 60, max: 1440
A cursor for use in pagination. Corresponding to the next_page field from the previous response.
Response
200 application/json
Response
Usage data retrieved successfully.
UsageResponse
Allowed values:page